package com.hs.srm.admin.modules.requisition.service;

import java.util.List;
import java.util.Map;

import com.hs.srm.admin.modules.pricemanagement.vo.EssentialInformationVO;
import com.hs.srm.admin.modules.requisition.entity.ProPurchRequestItemEntity;
import com.hs.srm.admin.modules.ssess.vo.SsessAndProPurchRequest;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.service.IService;
import com.hs.srm.common.utils.PageUtils;

/**
 * @author yanfei
 *
 * @date 2019年6月15日
 */
public  interface ProPurchRequestItemService extends IService<ProPurchRequestItemEntity> {

	//申请采购明细
	PageUtils queryPage(Map<String, Object> params);
	//根据采购单号来查询对应的实体
	List<ProPurchRequestItemEntity>  findByNo(String purchRequestCode,List<String> ids);
	//根据id查询行项目
	ProPurchRequestItemEntity selectById(@Param("pkId") String pkId);
	//根据采购编号查询行项目的数据
	List<ProPurchRequestItemEntity> selectBatchIds(List<String> ids);

	//查询所有的申请明细
	List<ProPurchRequestItemEntity> selectRequestItem();

	List<Map<String,String>> selectUserMapList(List<String> ids);

	//批量更新状态
	boolean updateGoodsStatusBatch(List<ProPurchRequestItemEntity> list);
	//批量更新
	boolean updateGoodsStatus(ProPurchRequestItemEntity proPurchRequestItemEntity);

	public PageUtils selectDetailPage(Map<String, Object> params);

	//联合查询
	public List<SsessAndProPurchRequest> selectSsess();

	//更新所有数据
	public  boolean  updateProPurchRequestItemEntity(ProPurchRequestItemEntity proPurchRequestItemEntity);
	//简化版
	public List<SsessAndProPurchRequest> selectSsessSimplify();

	//货源分配从配额取则修改配额数
    boolean updateQuotaNum(EssentialInformationVO essentialInformationVO);

	//改变货源状态
	boolean changeGoodsStatus(int goodsStatus, String npkId);
	//修改
	ProPurchRequestItemEntity findbypkId(String pkid);

	void updateAll(ProPurchRequestItemEntity proPurchRequestItemEntity);

    int updateStatus(String requestCode, String purchRequestItemCode);
}
